<?php
	require_once('inc.config.php');
	
	
$con = array();

$condition = array(
	"price" => $_REQUEST["s_price"],
	"square" => $_REQUEST["s_square"],
	"floor" => $_REQUEST["s_floor"],
	"plaza"  => $_REQUEST["s_plaza"],
	"decoration" => $_REQUEST["s_decoration"],
	"style" => $_REQUEST["s_style"],
	"prop" => $_REQUEST["s_prop"],
	"lx" => $_REQUEST["s_lx"],
	"area" => $_REQUEST["s_area"],
	"ispublic" => 1
);

$type;
foreach($_GET as $key=>$value){
	if($key=="order"){
		$order=$value;
	}else if($key=="sellorrent"){
		$type=$value;
	}else{
		$con[$key] = $value;
	}
}

if($type==0){
	$result = $myHouse->getSearchSellList($con , $order , 1 ,__search_map_num__);
}else{
	$result = $myHouse->getSearchRentList($con , $order , 1 , __search_map_num__);
}
echo json_encode($result);
?>